﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DX.engine
{
    public struct Point3D
    {
        public float x;
        public float y;
        public float z;
    }

    public class Entity
    {
        private int EntityID;
        private string ModelName;
        private Point3D position;

        public Entity()
        {
            this.EntityID = Engine.GetEntityEngine().GetNextEntityID();
        }

        public Entity(string ModelName) : this()
        {
            this.ModelName = ModelName;
        }

        public Entity(string ModelName, Point3D position) : this()
        {
            this.ModelName = ModelName;
            this.position = position;
        }

        public override string ToString()
        {
            string pos = string.Format("({0}, {1}, {2})",position.x, position.y, position.z);
            string info = string.Format("Entity:{0}\r\nModel:{1}\r\nPosition:{2}", EntityID, ModelName, pos);
 	        return info;
        }


        public string GetModel()
        {
            return ModelName;
        }

        public void SetModel(string newModel)
        {
            ModelName = newModel;
        }

        public int GetEntityID()
        {
            return EntityID;
        }

        public Point3D GetPosition()
        {
            return position;
        }

        public void SetPosition(Point3D newPosition)
        {
            position = newPosition;
        }
    }
}
